home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Freeware / Comunicatii / htttrack / httrack-3.32-2.exe / {app} / src_win / WinHTTrack / RasLoad.cpp < prev    next >
C/C++ Source or Header  |  1999-10-17  |  1KB  |  41 lines

  1. /*----------------------------------------------------------------------
  2. Copyright (c) 1998,1999 Gipsysoft. All Rights Reserved.
  3. File:    DynamicRAS.h
  4. Owner:    russf@gipsysoft.com
  5. Purpose:    Dynamically loaded RAS.
  6. ----------------------------------------------------------------------*/
  7.  
  8. #include "stdafx.h"
  9. #include "RasLoad.h"
  10.  
  11. CDynamicRAS::CDynamicRAS()
  12.     : m_hInst( LoadLibrary( _T("rasapi32") ) )
  13.     , pRasEnumConnections( NULL )
  14.     , pRasHangUp( NULL )
  15.     , pRasGetConnectStatus( NULL )
  16.   , pRasDial( NULL )
  17.   , pRasEnumEntries( NULL )
  18.   , pRasGetEntryDialParams( NULL )
  19. {
  20.     if( IsRASLoaded() )
  21.     {
  22.         pRasEnumConnections = (PRASENUMCONNECTIONS)GetProcAddress( m_hInst, "RasEnumConnectionsA" );
  23.         pRasHangUp = (PRASHANGUP)GetProcAddress( m_hInst, "RasHangUpA" );
  24.         pRasGetConnectStatus = (PRASGETCONNECTSTATUS)GetProcAddress( m_hInst, "RasGetConnectStatusA" );
  25.         pRasDial = (PRASDIAL)GetProcAddress( m_hInst, "RasDialA" );
  26.     pRasEnumEntries = (PRASENUMENTRIES)GetProcAddress( m_hInst, "RasEnumEntriesA" );
  27.     pRasGetEntryDialParams = (PRASGETENTRYDIALPARAMS)GetProcAddress( m_hInst, "RasGetEntryDialParamsA" );
  28.     }
  29. }
  30.  
  31. CDynamicRAS::~CDynamicRAS()
  32. {
  33.     if( IsRASLoaded() )
  34.     {
  35.         FreeLibrary( m_hInst );
  36.     }
  37. }
  38.  
  39.  
  40.  
  41.